from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from info import create_app,db
import pymysql
pymysql.install_as_MySQLdb()


app = create_app("development")

# 创建管理类
manager = Manager(app)

# 创建数据库迁移对象
migrate = Migrate(app, db)

# 创建迁移命令
manager.add_command("db", MigrateCommand)


if __name__ == '__main__':
    # 3.运行管理项目
    manager.run()
